package com.baoidea.data.service;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;

public class NewTableh2 extends SQLiteOpenHelper {

	private static final int VERSION = 2;
	private Context context = null;

	public NewTableh2(Context context, String name, CursorFactory factory,
			int version) {
		super(context, name, factory, version);
		this.context = context;
		// TODO Auto-generated constructor stub
	}

	public NewTableh2(Context context, String name) {
		this(context, name, null, VERSION);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		String sql = "create table history(id int,name varchar(20),com varchar(30),date varchar(50))";
		// db.execSQL("create table user(id int,name varchar(20))");
		System.out.println(sql);
		db.execSQL(sql);
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		// TODO Auto-generated method stub

	}

}
